package ltd.newbee.mall.service.impl;

import ltd.newbee.mall.dao.EvaluationMapper;
import ltd.newbee.mall.entity.Evaluation;
import ltd.newbee.mall.service.EvaluationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class EvaluationServiceImpl implements EvaluationService {

    @Autowired
    private EvaluationMapper evaluationMapper;
    @Override
    public void save(Evaluation evaluation) {
        evaluationMapper.save(evaluation);
    }

    @Override
    public List<Evaluation> selectByProductId(Long id) {
        return evaluationMapper.selectByProductId(id);
    }

    @Override
    public Long selectCount(Long id) {
        return evaluationMapper.selectCount(id);
    }
}
